//
//  JQFYUserInfoModel.m
//  JQFY
//
//  Created by 代辉 on 2017/10/21.
//  Copyright © 2017年 yannis. All rights reserved.
//

#import "JQFYUserInfoModel.h"

@implementation JQFYUserInfoModel

- (void)getUserInfo:(void(^)(NSDictionary *userInfo))success fail:(void(^)(NSError *error))fail
{
    [[AFHTTPSessionManager manager] POST:@"http://app.uninhibited.cn/api/user/listuser"
                              parameters:@{@"token":[JQFYUserData userDataInSandbox].token}
                                progress:nil
                                 success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
                                     success(responseObject);
                                 } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                                     if (error) {
                                         if (fail) {
                                             fail(error);
                                         }
                                     }
                                 }];
}

@end
